Abstract With new developments in RNA biology, RNA biotechnology and RNA biomedicine each year, there is an urgent need to understand RNA mechanism in as much detail as possible. Small RNA techniques (miRNAs and siRNAs), and CRISPR-Cas9 gene editing are changing the landscape of biotechnology and biomedicine. Riboswitch RNAs are (i) important in bacterial gene regulation, (ii) interesting antimicrobial targets, and (iii) have potential for optimizing biotechnologies such as CRISPR-Cas9. These RNAs are excellent model systems for studying the hallmarks of RNA mechanism: magnesium-driven electrostatic effects, large 3-D conformational changes, changes in secondary structure, and co-transcriptional effects. Since 2009, we have published a variety of explicit solvent molecular dynamics simulation, structure-based molecular simulation, and wetlab biochemistry studies of riboswitches to understand their operation and the effect of magnesium on riboswitch structure and function. Focusing mainly on the aptamer domain of the SAM-I riboswitch, we have established that magnesium and SAM work together to achieve the fully collapsed, native state. In addition, magnesium facilitates a partial collapse, leaving the aptamer in a state permissible to strand invasion by the expression platform. In this project, we will study the entire riboswitch (aptamer and expression platform), investigating the role of magnesium in riboswitch function. Using atomistic structure-based electrostatic potential models for RNA and magnesium, we will disentangle the roles of inner sphere, outer sphere and diffuse magnesium ion effects in riboswitch operation. Using experimentally determined intermediate configurations, we will study transitions between intermediates during various points of riboswitch function. Our modeling we be enhanced by constraints from a variety of biochemical and biophysical experiments. We will address the fundamental question: How does the ionic environment enable riboswitch RNAs to accomplish their function?